1. Field of the Invention
The present invention relates to an image signal compression apparatus which encodes and compresses image data, and an image signal expansion apparatus which decodes and expands compressed image data, and relates specifically to an image data compression and expansion apparatus which, when there are text areas, dot areas, or halftone areas in a whole image, applies optimal compression processing to each area and obtains a high quality expanded signal. The present invention further relates to an image area discrimination processing apparatus which discriminates the distinct image areas when there are text areas, dot areas, or halftone areas in a whole image to apply optimized image processing.
2. Description of the Prior Art
The application of static image compression and expansion devices and image area discrimination processing devices in facsimiles, electronic filing systems, digital copiers, and other electronic image management systems has been studied in recent years due to the demand for an image data compression and expansion apparatus that can process halftone and color static images containing both text and non-text image areas with a high compression rate while obtaining a high quality expanded image, and for an image area discrimination processing device enabling processing optimized to the image area.
A conventional image data compression and expansion apparatus is described hereinbelow with reference to the accompanying figures.
FIG. 18 is a block diagram of a conventional image data compression apparatus comprising an image blocking circuit 2 which divides the input image data into blocks of eight pixels square (8.times.8 pixels), and outputs the blocked image signal 3. The discrete cosine transformation circuit 4 applies two-dimensional discrete cosine transform to the blocked image signal 3, and outputs the transformation coefficients 5. The transformation coefficients K.sub.ij in the blocks converted by the discrete cosine transformation circuit 4 are arrayed as shown in FIG. 19. K.sub.00 is the direct current transformation coefficient (hereinafter the DC coefficient), and all values other than K.sub.00 are alternating current transformation coefficients (hereinafter the AC coefficients). The greater the values of i and j, the higher the spatial frequency of the transformation coefficient.
The quantization circuit 6 applies linear quantization to the transformation coefficients 5 of each block using a predetermined quantization table with a quantization step which has different values in accordance with the position of each transformation coefficient. An example of this quantization table is shown in FIG. 20. The differential circuit 8 outputs the differential value 9 between the DC coefficient quantized for the one previous block and the DC coefficient 7 quantized for the current block. The variable length coding circuit 10 applies a variable length coding, e.g., run length coding or Huffman coding, based on the probability of occurrence of the differential value 9.
The zigzag scan circuit 12 scans the quantized AC coefficients 11 for each block in the order shown in FIG. 21. The variable length coding circuit 13 applies variable length coding, e.g., run length coding or Huffman coding, to the zigzag scanned quantized AC coefficients 18. The multiplexing circuit 14 multiplexes the variable length coded difference 16 and AC coefficient 17, and outputs the encoded image data 15.
FIG. 22 is a block diagram of a conventional image data expansion apparatus.
The encoded image data 15 is the data encoded by the image data compression apparatus described above. The separation circuit 21 outputs the differential value 22, which is obtained by variable length coding the differential value 9 of the encoded image data 15, and outputs the variable length coded AC coefficient 23. The variable length decoding circuit 24 decodes the differential value 22 and outputs the quantized differential value 25. The differential decoding circuit 26 decodes the DC coefficient 27 quantized from the quantized difference 25. The variable length decoding circuit 28 decodes the variable length coded AC coefficient 23, and outputs the quantized AC coefficient 29. The raster scan transformation circuit 30 converts the order of the zigzag scanned quantized AC coefficients 29 to a normal raster sequence, and outputs the raster scanned quantized AC coefficients 31. The inverse quantization circuit 32 inverse quantizes for each block the quantized transformation coefficients obtained from the quantized AC coefficients 31 and the quantized DC coefficient 27, and outputs the inverse quantized transformation coefficients 33. The discrete cosine inverse transformation circuit 34 applies discrete cosine inversion to the inverse quantized transformation coefficients 33, and outputs the expanded image data 35 (for reference, see JPEG Technical Specification Revision 6, Jun. 24, 1990).
However, in a conventional image compression and expansion apparatus as described above, the text areas of the image data tend to become fuzzy and noise is introduced to the white background around the text in the expanded image signal if the quantization steps of the quantization table are large, because only a single quantization table is used for any single image. Conversely, if the quantization steps of the quantization table are small, the compression rate of the image data drops. Furthermore, if there are dot patterns in the image data, the compression rate of the image data also drops, because the absolute value of the high frequency AC coefficient after an orthogonal transform (such as a discrete cosine transform) increases.
The construction and operation of a conventional image area discrimination apparatus is described hereinbelow with reference to the accompanying figures.
FIG. 23 is a block diagram of a conventional image area discrimination apparatus. The RGB color signals, which are obtained by scanning the original, are input in parallel to a halftone image filtering circuit 601, a binary image filtering circuit 602, and an area discrimination circuit 610. The halftone image filtering circuit 601 is a two-dimensional filter which applies band emphasis processing, assuming that the target image area is a halftone image area. The frequency characteristics of this filter are set to eliminate any dot components and enhance the sharpness of image.
The image filtering circuit 602 applies edge component emphasizing processing for text images, assuming that the target image area is a binary image area. The binarization circuit 603 digitizes the RGB color signals with each respective threshold only when the hue signals r1, g1, and b1, output from the hue discrimination circuit 605, (described below) are ON; when the hue signals r1, g1, and b1 are OFF, the RGB color signals are output unmodified.
The binary image data thus obtained from the halftone image filtering circuit 601 and the binarization circuit 603 is then selectively output to an appropriate processing circuit by the selector circuit 604 in response to a discrimination signal from an area discrimination circuit 610, which is described below.
The area discrimination circuit 610 comprises a hue discrimination circuit 605, a threshold value storage ROM 606 that stores the threshold values used for area discrimination, a signal synthesis circuit 607, an edge signal generator 608, and a comparator 609. The signal synthesis circuit 607 generates a luminance signal from the RGB color signals and outputs it as a synthesis signal d.
The synthesis signal d is input to the edge signal generator 608, which computes the difference between the maximum and minimum values in the 3.times.3 pixel window of which the center is the target pixel, and outputs an edge signal e. The comparator 609 compares the edge signal e with a predetermined threshold value; if the edge signal e is greater than the threshold value, the comparator 609 outputs a "1" indicating a binary image area, and if less than the threshold value outputs a "0" indicating a halftone image area, to the selector circuit 604. The hue discrimination circuit 605 identifies the hue of the target pixel as one of seven hues, i.e., yellow, magenta, cyan, black, red, green, or blue, and outputs the color hue signals r1, g1, and b1. The threshold value storage ROM 606 outputs to the comparator 609 the identified 8-bit threshold value corresponding to the hue for area discrimination by reading the value at the address defined by the color hue signals r1, g1, and b1.
The comparator 609 compares the threshold value for each hue with the edge signal e from the edge signal generator 608 to determine whether the target area is a halftone image or text area; the selector circuit 604 thus selects the signal to which was applied the processing suitable for the respective area, and outputs the result as signals r, g, b to the color correction and under color removal circuit 611. The color correction and under color removal circuit 611 applies correction to compensate for any muddying of the colors, applies under color removal, and generates the cyan (C), magenta (M), yellow (Y), and black (K) signals. A color printer (not shown) then reproduces the original image on the recording medium with a coloring agent corresponding to each color (See, for example, Japanese patent laid-open publication No. S64-41377)
When it is attempted to discriminate a text area having somewhat small edge components using the area discrimination apparatus as thus described, halftone image area of relatively large edge components or dot pattern area is falsely identified as text area, and, accordingly, halftone image cannot be faithfully reproduced. In addition, when the apparatus is set to avoid such a false discrimination, it is only possible to discriminate text areas with sufficiently large edge components, and reproduction of text areas deteriorates. Furthermore, because dot pattern areas cannot be detected even when they are present in the image signal, processing suitable for dot areas cannot be applied thereto.